<template>
    <div class="sm-spm-topButton">
        <!-- <el-button size="mini" type="primary" @click="callBle">虚拟配套计算</el-button> -->
        <el-popconfirm
        title="确定虚拟配套计算吗？"
        @onConfirm='callBle()'  
        >
            <el-button size="mini" type="primary" slot="reference" style="margin-right:10px">虚拟配套计算</el-button>
        </el-popconfirm>
        <el-button size="mini" type="primary">工艺更改虚拟配套</el-button>
        <el-button size="mini" type="success">配套导出EXCEl</el-button>
    </div>
</template>
<script>
import { smSpmCallBle } from "@/utils/api.js"
export default {
    name:"SpmTopButton",
    methods:{
        asd(){
            console.log('123')
        },
        // 虚拟配套计算
        callBle(){
            smSpmCallBle({

            }).then((res)=>{
                console.log('虚拟配套计算',res)
                if(res.data.retCode == 200){
                    this.$Alert({
                        title: "成功",
                        message: res.data.message,
                        type: "success",
                    });
                }else{
                this.$Alert({
                    title: "失败",
                    message: res.data.message,
                    type: "error",
                });
                }
            })
        }
        
    }
}
</script>
<style>
.el-popconfirm {
    background-color: white !important;
}
.popper__arrow {
    border-bottom-color:white
}
</style>
<style scoped>
.sm-spm-topButton {
    width: 100%;
    height: 100%;
}
</style>